package com.insurance.common.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author Style
 * @version 1.0
 * @date 2021/3/11
 **/
@ApiModel(value = "订单")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class OrderDto {

    @ApiModelProperty(value = "订单id")
    private String orderId;

    @ApiModelProperty(value = "投保单id", required = true)
    private String proposalId;

    @ApiModelProperty(value = "产品id", required = true)
    private String productId;

    @ApiModelProperty(value = "产品名称")
    private String productName;

    @ApiModelProperty(value = "订单金额", required = true)
    private String orderPrice;

    @ApiModelProperty(value = "方案id", required = true)
    private String caseId;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "电话号")
    private String telephone;

    @ApiModelProperty(value = "证件号")
    private String cardId;

    @ApiModelProperty(value = "支付时间")
    private Date payTime;

    @ApiModelProperty(value = "流水号")
    private String serialNumber;

    @ApiModelProperty(value = "订单状态", required = true)
    private String orderState;

    @ApiModelProperty(value = "投保单对象", required = true)
    private ProposalDto proposalDto;

    @ApiModelProperty(value = "订单id字符串")
    private String orderIdStr;

    @ApiModelProperty(value = "投保单id字符串")
    private String proposalIdStr;

    @ApiModelProperty(value = "产品id字符串")
    private String productIdStr;

    @ApiModelProperty(value = "方案id字符串")
    private String caseIdStr;

    public String getOrderIdStr() {
        return this.orderId != null ? String.valueOf(this.orderId) : "";
    }

    public String getProposalIdStr() {
        return this.proposalId != null ? String.valueOf(this.proposalId) : "";
    }

    public String getProductIdStr() {
        return this.productId != null ? String.valueOf(this.productId) : "";
    }

    public String getCaseIdStr() {
        return this.caseId != null ? String.valueOf(this.caseId) : "";
    }

}
